import request from '@/utils/request'

export function fetchList(data) {
  return request({
    url: '/order',
    method: 'get',
    params: data
  })
}

export function firstList(data) {
  return request({
    url: '/firstorder',
    method: 'get',
    params: data
  })
}

export function secondList(data) {
  return request({
    url: '/secondorder',
    method: 'get',
    params: data
  })
}

export function getFirstOrder(data) {
  return request({
    url: '/firstorder/getorder',
    method: 'post',
    data
  })
}

export function getSecondOrder(data) {
  return request({
    url: '/secondorder/getorder',
    method: 'post',
    data
  })
}

export function orderDetail(id) {
  return request({
    url: '/order/' + id,
    method: 'get'
  })
}

export function firstHasList(data) {
  return request({
    url: '/firstorder/orderlist',
    method: 'get',
    params: data
  })
}

export function secondHasList(data) {
  return request({
    url: '/secondorder/orderlist',
    method: 'get',
    params: data
  })
}

export function firstHistoryList(data) {
  return request({
    url: '/firstorder/histroyorders',
    method: 'get',
    params: data
  })
}

export function secondHistoryList(data) {
  return request({
    url: '/secondorder/histroyorders',
    method: 'get',
    params: data
  })
}

export function firstAssignSelect(data) {
  return request({
    url: '/firstorder/assignselect',
    method: 'get',
    params: data
  })
}

// 订单调配下拉菜单
export function secondAssignSelect(data) {
  return request({
    url: '/secondorder/assignselect',
    method: 'get',
    params: data
  })
}

// 初审订单调配列表
export function firstAssignList(data) {
  return request({
    url: '/firstorder/assignlist',
    method: 'get',
    params: data
  })
}

export function firstGetSavecheck(data) {
  return request({
    url: '/firstorder/getsavecheck',
    method: 'get',
    params: data
  })
}
export function firstRegive(data) {
  return request({
    url: '/firstorder/regive',
    method: 'post',
    data
  })
}

export function firstCheckList(data) {
  return request({
    url: '/firstorder/getchecklist',
    method: 'get',
    params: data
  })
}

export function firstCheckSubmit(data) {
  return request({
    url: '/firstorder/ordercheck',
    method: 'post',
    data
  })
}

export function secondCheckList(data) {
  return request({
    url: '/secondorder/getchecklist',
    method: 'get',
    params: data
  })
}

export function secondRegive(data) {
  return request({
    url: '/secondorder/regive',
    method: 'post',
    data
  })
}

// 复审订单调配
export function secondAssignList(data) {
  return request({
    url: '/secondorder/assignlist',
    method: 'get',
    params: data
  })
}

// 复审审核
export function secondCheck(data) {
  return request({
    url: '/secondorder/check',
    method: 'post',
    data
  })
}

// 复审回访
export function secondCall(data) {
  return request({
    url: '/call',
    method: 'post',
    data
  })
}

// 获取回访记录
export function getCallList(data) {
  return request({
    url: '/call/list',
    method: 'get',
    params: data
  })
}

// 获取最后一条审核备注
export function secondLastRemark(data) {
  return request({
    url: '/check/lastfirstremark',
    method: 'get',
    params: data
  })
}

// 获取审核记录
export function allCheckList(data) {
  return request({
    url: '/check/list',
    method: 'get',
    params: data
  })
}

// 获取当前登录人初审审核记录
export function getFirstCheckList(data) {
  return request({
    url: '/check/firstchecklist',
    method: 'get',
    params: data
  })
}

// 获取当前登录人复审审核记录
export function getSecondCheckList(data) {
  return request({
    url: '/check/secondchecklist',
    method: 'get',
    params: data
  })
}

// 获取用户信息，包括银行卡信息
export function getUserinfo(data) {
  return request({
    url: '/secondorder/userinfo',
    method: 'get',
    params: data
  })
}

// 添加银行卡
export function addBankCard(data) {
  return request({
    url: '/secondorder/addcard',
    method: 'post',
    data
  })
}

// 获取健康问卷信息
export function healthQuestionInfo(data) {
  return request({
    url: '/healthquestion',
    method: 'get',
    params: data
  })
}

// 获取该用户全部购买订单
export function getAllUserOrder(data) {
  return request({
    url: '/order/getorderbyuser',
    method: 'get',
    params: data
  })
}

